package order.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import common.model.result.Result;
import order.service.impl.CouponServiceFeignClientFallback;

@Service
@FeignClient(name = "coupon-server",fallback = CouponServiceFeignClientFallback.class)
public interface CouponServiceFeignClient {
    @GetMapping("/coupon/code")
    public Result getCouponByCode(
        @RequestParam(value = "couponCodes") List<String> couponCodes,
        @RequestParam(value = "userId") Long userId,
        @RequestParam(value = "orderNo") String orderNo
    );
}
